<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>NSData(TFCore) Category Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1334)">
</head>
<body class="appledoc">
	<header>
		<div class="container" class="hide-in-xcode">
			
			<h1 id="library-title">
				<a href="../index.html">TFFoundation </a>
			</h1>

			<p id="developer-home">
				<a href="../index.html">“Timeface”</a>
			</p>
			
		</div>
	</header>

	<aside>
		<div class="container">
			<nav>
				<ul id="header-buttons" role="toolbar">
					<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>

					<li id="on-this-page" role="navigation">
						<label>
							On This Page

							<div class="chevron">
								<div class="chevy chevron-left"></div>
								<div class="chevy chevron-right"></div>
							</div>

							<select id="jump-to">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	

	
	
	<option value="tasks">Tasks</option>
	
	

	
	

	
	<optgroup label="Class Methods">
		
		<option value="//api/name/tf_aesKeyDataWithKey:">+ tf_aesKeyDataWithKey:</option>
		
		<option value="//api/name/tf_dataWithBase64EncodedString:">+ tf_dataWithBase64EncodedString:</option>
		
	</optgroup>
	

	
	<optgroup label="Instance Methods">
		
		<option value="//api/name/tf_base64EncodedString">- tf_base64EncodedString</option>
		
		<option value="//api/name/tf_base64EncodedStringWithWrapWith:">- tf_base64EncodedStringWithWrapWith:</option>
		
		<option value="//api/name/tf_decodeToJsonObject">- tf_decodeToJsonObject</option>
		
		<option value="//api/name/tf_gUnZippedData">- tf_gUnZippedData</option>
		
		<option value="//api/name/tf_gZippedData">- tf_gZippedData</option>
		
		<option value="//api/name/tf_gZippedDataWithCompressionLevel:">- tf_gZippedDataWithCompressionLevel:</option>
		
		<option value="//api/name/tf_isGZippedData">- tf_isGZippedData</option>
		
		<option value="//api/name/tf_md5Data">- tf_md5Data</option>
		
		<option value="//api/name/tf_md5String">- tf_md5String</option>
		
		<option value="//api/name/tf_utf8EncodedString">- tf_utf8EncodedString</option>
		
	</optgroup>
	
	
</select>
						</label>
					</li>
				</ul>
			</nav>
		</div>
	</aside>

	<article>
		<div id="overview_contents" class="container">
			<div id="content">
				<main role="main">
					<h1 class="title">NSData(TFCore) Category Reference</h1>

					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<th>Declared in</th>
	<td>NSData+TFCore.h<br />NSData+TFCore.m</td>
</tr>
						</tbody></table></div>
					

                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>NSData的常用类别</p>
					</div>
					
					

					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						

						
						

						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/tf_md5Data" title="tf_md5Data"></a>
	<h3 class="method-title"><code><a href="#//api/name/tf_md5Data">&ndash;&nbsp;tf_md5Data</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>通过NSData转换成md5格式的NSData</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (nonnull NSData *)tf_md5Data</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>NSData</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>通过NSData转换成md5格式的NSData</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NSData+TFCore.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/tf_md5String" title="tf_md5String"></a>
	<h3 class="method-title"><code><a href="#//api/name/tf_md5String">&ndash;&nbsp;tf_md5String</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>通过NSData获取小写的md5加密格式字符串</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (nonnull NSString *)tf_md5String</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>NSString</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>通过NSData获取小写的md5加密格式字符串</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NSData+TFCore.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/tf_utf8EncodedString" title="tf_utf8EncodedString"></a>
	<h3 class="method-title"><code><a href="#//api/name/tf_utf8EncodedString">&ndash;&nbsp;tf_utf8EncodedString</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>根据NSData获取UTF8编码格式的字符串</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (nonnull NSString *)tf_utf8EncodedString</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>NSString</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>根据NSData获取UTF8编码格式的字符串</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NSData+TFCore.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/tf_dataWithBase64EncodedString:" title="tf_dataWithBase64EncodedString:"></a>
	<h3 class="method-title"><code><a href="#//api/name/tf_dataWithBase64EncodedString:">+&nbsp;tf_dataWithBase64EncodedString:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>将字符串转经过base64格式编码之后，转换成NSData</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (nonnull NSData *)tf_dataWithBase64EncodedString:(nonnull NSString *)<em>string</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>string</code></th>
						<td><p>字符串</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>NSData</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>将字符串转经过base64格式编码之后，转换成NSData</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NSData+TFCore.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/tf_base64EncodedString" title="tf_base64EncodedString"></a>
	<h3 class="method-title"><code><a href="#//api/name/tf_base64EncodedString">&ndash;&nbsp;tf_base64EncodedString</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>根据NSData获取Base64编码格式的字符串</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (nonnull NSString *)tf_base64EncodedString</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>NSString</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>根据NSData获取Base64编码格式的字符串</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NSData+TFCore.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/tf_base64EncodedStringWithWrapWith:" title="tf_base64EncodedStringWithWrapWith:"></a>
	<h3 class="method-title"><code><a href="#//api/name/tf_base64EncodedStringWithWrapWith:">&ndash;&nbsp;tf_base64EncodedStringWithWrapWith:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>根据NSData和换行长度获取Base64编码格式的字符串</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (nonnull NSString *)tf_base64EncodedStringWithWrapWith:(NSInteger)<em>wrapWidth</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>wrapWidth</code></th>
						<td><p>换行长度</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>NSString</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>根据NSData和换行长度获取Base64编码格式的字符串</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NSData+TFCore.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/tf_aesKeyDataWithKey:" title="tf_aesKeyDataWithKey:"></a>
	<h3 class="method-title"><code><a href="#//api/name/tf_aesKeyDataWithKey:">+&nbsp;tf_aesKeyDataWithKey:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>根据字符串获取对应的aes的keyNSData</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (nonnull NSData *)tf_aesKeyDataWithKey:(nonnull NSString *)<em>key</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>key</code></th>
						<td><p>秘钥</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>NSData</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>根据字符串获取对应的aes的keyNSData</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NSData+TFCore.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/tf_decodeToJsonObject" title="tf_decodeToJsonObject"></a>
	<h3 class="method-title"><code><a href="#//api/name/tf_decodeToJsonObject">&ndash;&nbsp;tf_decodeToJsonObject</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>将NSData转换成json对象</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (nullable id)tf_decodeToJsonObject</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>id</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>将NSData转换成json对象</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NSData+TFCore.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/tf_gZippedDataWithCompressionLevel:" title="tf_gZippedDataWithCompressionLevel:"></a>
	<h3 class="method-title"><code><a href="#//api/name/tf_gZippedDataWithCompressionLevel:">&ndash;&nbsp;tf_gZippedDataWithCompressionLevel:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>对NSData根据压缩级别进行GZip压缩</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (nonnull NSData *)tf_gZippedDataWithCompressionLevel:(float)<em>level</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>level</code></th>
						<td><p>压缩级别</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>压缩后的NSData</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>对NSData根据压缩级别进行GZip压缩</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NSData+TFCore.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/tf_gZippedData" title="tf_gZippedData"></a>
	<h3 class="method-title"><code><a href="#//api/name/tf_gZippedData">&ndash;&nbsp;tf_gZippedData</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>对NSData进行GZip压缩，默认级别-1.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (nonnull NSData *)tf_gZippedData</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>压缩后的NSData.</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>对NSData进行GZip压缩，默认级别-1.</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NSData+TFCore.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/tf_gUnZippedData" title="tf_gUnZippedData"></a>
	<h3 class="method-title"><code><a href="#//api/name/tf_gUnZippedData">&ndash;&nbsp;tf_gUnZippedData</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>对NSData进行GZip解压缩</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (nonnull NSData *)tf_gUnZippedData</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>解压缩后的NSData</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>对NSData进行GZip解压缩</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NSData+TFCore.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/tf_isGZippedData" title="tf_isGZippedData"></a>
	<h3 class="method-title"><code><a href="#//api/name/tf_isGZippedData">&ndash;&nbsp;tf_isGZippedData</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>判断一个NSData是否GZip压缩后的数据</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (BOOL)tf_isGZippedData</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>BOOL</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>判断一个NSData是否GZip压缩后的数据</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NSData+TFCore.h</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						
					</div>
					
					

                    
                    
          
				</main>

				<footer>
					<div class="footer-copyright">
						
						<p class="copyright">Copyright &copy; 2017 “Timeface”. All rights reserved. Updated: 2017-08-17</p>
						
						
						<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
						
					</div>
				</footer>
			</div>
		</div>
	</article>

	<script src="../js/script.js"></script>
</body>
</html>